package com.base;

public class Testdaemon {
    public  static  void main(String [] args) {

        Thread thread=new Thread(new Runnable() {
            public void run() {
               while (true)
               {
                   System.out.println(Thread.currentThread().getName()+"running");
               }
            }
        });
        System.out.println(Thread.currentThread().getName()+"开始");
        //thread.setDaemon(true);
        thread.start();
        System.out.println(Thread.currentThread().getName()+"结束");


    }
}
